package com.viking.domain;

import lombok.Data;

/**
 * 限流 结果返回
 * @author viking
 */
@Data
public class BlockExceptResult<T> {
    private Integer code;
    private String msg;
    private T data;

    public BlockExceptResult(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public BlockExceptResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static BlockExceptResult error(Integer code, String msg){
        return new BlockExceptResult(code,msg);
    }
}
